package com.romotc.os;

import java.io.InputStreamReader;
import java.io.LineNumberReader;

public class RunOsCmd {

public static String runCmd(String cmd) {
	try {
			Process process = Runtime.getRuntime().exec(cmd);
			InputStreamReader ir = new InputStreamReader(process.getInputStream());
			LineNumberReader input = new LineNumberReader(ir);
			String line;
			while((line = input.readLine()) != null) {
				System.out.println(line);
			}
			
		} catch (Exception e) {
		// TODO: handle exception
			e.printStackTrace();
	}
		return "";
	
}
}